package com.ets.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import com.ets.entity.*;
import com.ets.dao.*;
@Service
public class PaperService {
	@Resource
	private PaperDao dao;
	//Get paper by id.
	public Paper getPaper(int id){
		return dao.getPaperById(id);
	}
	
	//Get all papers.
	public List<Paper> getAllPapers(){
		return dao.getAll();
	}
	
	//Update paper.
	public void updatePaper(Paper paper){
		dao.update(paper);
	}
	
	//Delete paper.
	public void deletePaper(int id){
		dao.delete(id);
	}
}
